"http://vimawesome.com  vim-plugin
set fileencodings=gbk,utf-8,gb18030,gb2312
set encoding=utf-8
set fileencoding=utf-8
set nu
syntax on
set tabstop=4
set shiftwidth=4
set cindent
set sm "smartmatch
set wildmenu
set foldmethod=manual "set default foldmethod

call plug#begin()
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'sickill/vim-monokai'
let g:airline_theme="molokai" 
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#buffer_nr_show = 1
set laststatus=2

"error plugin
"Plug 'w0rp/ale'
"format plugin
Plug 'godlygeek/tabular'
" () [] {} auto complete
Plug 'Raimondi/delimitMate'

Plug 'vimwiki/vimwiki'

Plug 'scrooloose/nerdtree'
map <f2> :NERDTreeToggle<cr>
Plug 'kien/ctrlp.vim'
map ;sb :CtrlPBufTagAll<cr>
set wildignore+=*/tmp/*,*.so,*.swp,*.zip     " MacOSX/Linux
set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe  " Windows

let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
let g:ctrlp_custom_ignore = {
  \ 'dir':  '\v[\/]\.(git|hg|svn)$',
  \ 'file': '\v\.(exe|so|dll)$',
  \ 'link': 'some_bad_symbolic_links',
  \ }



Plug 'justinmk/vim-sneak'
let g:sneak#label = 1
Plug 'easymotion/vim-easymotion'
Plug 'haya14busa/incsearch.vim'
map / <Plug>(incsearch-forward) 
map ? <Plug>(incsearch-backward)
map g/ <Plug>(incsearch-stay)
Plug 'haya14busa/incsearch-easymotion.vim'
map z/ <Plug>(incsearch-easymotion-/)
map z? <Plug>(incsearch-easymotion-?)
map zg/ <Plug>(incsearch-easymotion-stay)
Plug 'mhinz/vim-signify'
"Plug 'Shougo/neocomplcache.vim'
let g:neocomplcache_enable_at_startup = 1
Plug 'tpope/vim-surround'
Plug 'majutsushi/tagbar'
map <f3> :TagbarToggle<cr>
" Plug 'vim-scripts/taglist.vim'
map <f4> :TlistToggle<cr>
" Plug 'vim-scripts/gtags.vim'
if has("win32")
	Plug 'aceofall/gtags.vim'
	set cscopetag
	set cscopeprg='gtags-cscope'
	let GtagsCscope_Auto_Load = 1
	let CtagsCscope_Auto_Map = 1
	let GtagsCscope_Quiet = 1
endif

"Plug 'vim-scripts/grep.vim'
"if has("win32")
""	let Grep_Path = '"C:\Program Files (x86)\GnuWin32\bin\grep.exe"'
""	let Fgrep_Path = '"C:\Program Files (x86)\GnuWin32\bin\fgrep.exe"'
""	let Egrep_Path = '"C:\Program Files (x86)\GnuWin32\bin\egrep.exe"'
"endif

"let Grep_Skip_Dirs = './.git ./build .\.svn ./.vs'
"let Grep_Default_Filelist = '*.c *.cpp *.asm *.h *.txt *.json'

Plug 'mileszs/ack.vim'
Plug 'terryma/vim-expand-region'
Plug 'tpope/vim-commentary'
Plug 'luochen1990/rainbow'
Plug 'ntpeters/vim-better-whitespace'
Plug 'Valloric/YouCompleteMe'
Plug 'rdnetto/YCM-Generator'
Plug 'aquach/vim-http-client'
let g:http_client_result_vsplit = 0
Plug 'chiel92/vim-autoformat'
Plug 'plasticboy/vim-markdown'
Plug 'dhruvasagar/vim-table-mode'
let g:table_mode_corner_corner='+'
let g:table_mode_header_fillchar='='
"	+-------------+-----------------+
"	| cmd         | desciption      |
"	+=============+=================+
"	| <leader>tm  | TableModeToggle |
"	+-------------+-----------------+
"	| <leader>tdd | Delete Row      |
"	+-------------+-----------------+
"	| <leader>tdc | Delete Col      |
"	+-------------+-----------------+
"	<Leader>tr 重新对齐
" [| 移动到前一个表格
" ]| 移动到下一个表格
" {| 移动到上面一个表格
" }| 移动到下面一个表格
" || 插入表头边框
Plug 'mzlogin/vim-markdown-toc'
" :GenTocGFM
" :GenTocRedcarpet
Plug 'suan/vim-instant-markdown'
Plug 'richq/vim-cmake-completion'
Plug 'terryma/vim-multiple-cursors'
let g:rainbow_active = 1
Plug 'sjl/gundo.vim'
call plug#end()


"map key
map ;w :w<cr>
map ;q :q<cr>
map ;wq :wq<cr>
" quick fix next
map ;nn :cn<cr>
" quick fix prev
map ;pp :cp<cr>
" quickfix open
map ;ww :cw<cr>
" quickfix close
map ;cc :cclose<cr>
map ;tt :tabnew<cr>
map ;tn :bn<cr>
map ;tp :bp<cr>
map 9 $
map ;a; A;<esc>
" zoom big
map <c-b> <c-w>+
" zoom small
map <c-s> <c-w>-
nmap <s-s> :vertical resize -1<cr>
nmap <s-b> :vertical resize +1<cr>



syntax enable
colorscheme monokai

